" mkdir .vim
" cd .vim
" mkdir temp
" git clone http://github.com/gmarik/vundle.git bundle/vundle
set nocompatible
set cryptmethod=blowfish
set backspace=indent,eol,start
colorscheme darkblue

set enc=utf-8
set fileencodings=utf-8,cp936,sjis
set fileformat=unix
set number
set iminsert=0
set imsearch=0
" => temporary dir
" backup
set bk
set bdir=~/.vim/temp
" swap
set dir=~/.vim/temp
"set lines=40 columns=110
set guioptions-=T
set list
set listchars=tab:>-,trail:-
set number
" syntax color
syntax enable
syntax on
" hightlight trailing spaces
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
set ignorecase
set magic
set hls
set is

"convert tab to spaces
"set expandtab
set shiftwidth=4
set tabstop=4
set smarttab
set lbr
set tw=500
set ai
set si
set nowrap

"if has("autocmd")
    "autocmd FileType python,javascript,php set expandtab
"endif
map <F5> "+y
map <F6> "+p

set rtp+=~/.vim/vimfiles/
" ModifyTag.vim
"" project info
let g:mt_tag_key1 = 'Key Level 1'
let g:mt_tag_key2 = 'Key Level 2'
let g:mt_tag_key3 = 'Key Level 3'
let g:mt_tag_allowr = 1
let g:mt_tag_rlist  = ['Reason 1', 'Reason 2', 'Reason 3']
let g:mt_tag_rmode  = 3
let g:mt_tag_diffall = 0
"" developer info
let g:mt_tag_user   = 'thuleqaid'
let g:mt_tag_vigrep = 1
"" format setting
let g:mt_tag_timef  = "%Y/%m/%d"
let g:mt_tag_mode   = 0
let g:mt_tag_co     = ''
"" enable auto-expandtab
if has("autocmd")
    autocmd BufRead * ModifyTagAutoExpandTab
endif

"let g:guifontlist = ['',]
"exe 'set guifont=' . g:guifontlist[0]

filetype off                  " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#begin()
" let Vundle manage Vundle
" required! 
Plugin 'gmarik/vundle'

"Surround
Plugin 'surround.vim'

"VisIncr
Plugin 'VisIncr'

"snipMate
Plugin 'snipMate'

"Calendar
Plugin 'calendar.vim'

"Undo-Tree
Plugin 'mbbill/undotree'
if has("persistent_undo")
    set undodir=~/.vim/temp
    set undofile
endif

"Multiple Highlight
Plugin 'Mark--Karkat'
let g:mwAutoSaveMarks = 0

" MiniBufExplorer
Plugin 'minibufexpl.vim'
let g:miniBufExplMapWindowNavVim=1
set hidden

"NERDCommenter
Plugin 'The-NERD-Commenter'

"NERDTree
Plugin 'The-NERD-tree'

"Tagbar TagList's replacement
Plugin 'Tagbar'
"let g:tagbar_left = 1

"JavaScript-syntax
Plugin 'JavaScript-syntax'

"markdown
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
let g:vim_markdown_folding_disabled=1
let g:vim_markdown_initial_foldlevel=1

"Git
""Bundle 'fugitive.vim'
Plugin 'motemen/git-vim'
"" show branch name in the status line
"set laststatus=2
"set statusline=%{GitBranch()}
Plugin 'airblade/vim-gitgutter'
let g:gitgutter_max_signs = 9999

"Syntax check
Plugin 'Syntastic'
""C
let g:syntastic_c_check_header=1
let g:syntastic_c_auto_refresh_includes=1
let g:syntastic_c_errorformat='%f:%l:%c:%trror: %m'
let g:syntastic_c_compiler='gcc'
""C++
let g:syntastic_cpp_check_header=1
let g:syntastic_cpp_auto_refresh_includes=1
let g:syntastic_cpp_errorformat='%f:%l:%c:%trror: %m'
let g:syntastic_cpp_compiler_options='-std=c++11'
let g:syntastic_cpp_include_dirs= ['usr/local/include' ]
let g:syntastic_cpp_compiler='g++'
""python

"EasyMotion
Plugin 'EasyMotion'

"Status bar
Plugin 'bling/vim-airline'
let g:airline#extensions#tagbar#enabled = 0

"multiple cursors
Plugin 'terryma/vim-multiple-cursors'

"AutoComplPop
Plugin 'AutoComplPop'
"let g:acp_behaviorPythonOmniLength = -1

"OmniCppComplete
Plugin 'OmniCppComplete'
set tags+=~/work/cpp47.tag
set tags+=~/work/boost.tag

hi PmenuSel ctermbg=green
hi PmenuSel guibg=green

"VOom
Plugin 'VOom'

call vundle#end()
filetype plugin indent on     " required!
"
" Brief help
" :BundleList          - list configured bundles
" :BundleInstall(!)    - install (update) bundles
" :BundleSearch(!) foo - search (or refresh cache first) for foo
" :BundleClean(!)      - confirm (or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle commands are not allowed.

